package com.ih.pojo;

import lombok.ToString;
import sun.util.calendar.BaseCalendar;
import sun.util.calendar.CalendarUtils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

/**
 * @ClassName MyDate
 * @Description
 * @Author xiaozhang
 * @date 2023-05-06
 */
public class MyDate extends Date {

    public MyDate(){
        super();
    }
    public String toString() {
        // "EEE MMM dd HH:mm:ss zzz yyyy";
        Date date = new Date(super.getTime());
        DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String format = dateFormat.format(date);
        return format;
    }
}
